#!/sbin/openrc-run

depend() {
	need net
}

start() {
	ebegin "Starting PPPOE Server"
	test -x /usr/sbin/pppoe-server || exit 0
	start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
	eend $?
}

stop () {
	ebegin "Stopping PPPOE Server"
	start-stop-daemon --stop --exec /usr/sbin/pppoe-server
	eend $?
}

restart () {
        ebegin "Restarting PPPOE Server"
        start-stop-daemon --stop --exec /usr/sbin/pppoe-server
        sleep 1
        start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
        echo "."
}

